The present invention relates to an audio and/or video data coding and recording apparatus for variable length coding noncompressed audio and/or video data by a compressing and coding system such as the MPEG (Moving Picture coding Experts Group) method and recording the same on a conventionally existing recording medium such as a magneto-optical disk (MO) and hard disk (HD) or a new recording medium such as a digital video disk (DVD).
When reading out source data (stock data) from a recording medium of a video tape (master video tape) on which program data and other uncompressed and uncoded original audio and/or video data (source data or stock data) have been recorded for the purpose of compression and coding, usually, to prepare against unforeseen situations, the practice has been to reproduce the source data from a master video tape, copy it onto another VTR tape (work video tape), and further reproduce the source data from the work video tape for compression and coding.
Further, as the compression and coding system used when compressing and coding audio and/or video data and recording the same on a recording medium such as a magneto-optical disk (MO) or a digital video disk (DVD) or transmitting the same to another apparatus, a fixed rate (fixed length) compression and coding system and a variable rate (variable length) compression and coding system have been known.
Below, an explanation will be made of the variable rate compression and coding system and the fixed rate compression and coding system by taking as an example a case of compressing and coding video data. Note that, the compression and coding of audio data can be considered basically similar to the compression and coding of video data, but audio data generally consists of a smaller amount of data than video data and can be more easily compressed and coded than video data, therefore the compression and coding of the audio data will not be referred to here.
In the fixed rate compression and coding system, the compression and coding rate (bit rate) is always constant.
On the other hand, in the variable rate compression and coding system, in order to maintain the quality of the picture as a whole when expanding and decoding the compressed and coded data (compressed data), the compression and coding rate is changed based on the complexity of the picture and motion. For example, if variable rate compression and coding are performed on a relatively difficult part where the motion of the source data is vigorous, the amount of generated data becomes larger (bit rate becomes higher), while if the variable rate compression and coding is performed on a relatively simple part where the motion of the source data is small, the amount of generated data becomes smaller (bit rate becomes lower).
When considering the quality of the video after the expansion and decoding, when using the variable rate compression and coding system, it is possible to allocate a larger amount of data for the compression and coding of a complex picture and allocate a smaller amount of data for the compression and coding of a simple picture, therefore the compression and coding can be carried out while maintaining a uniform picture for the picture as a whole.
When performing the compression and coding by the fixed rate compression and coding system, however, at a part where the picture is complex and the motion is vigorous (picture pattern is complex) and therefore the amount of information is large, the fixed amount of data allocated to that part is not enough to maintain a sufficient quality of the picture. Conversely, in a part where the picture is simple and the motion is mild (picture pattern is simple) and therefore the amount of information is small, the fixed amount of data becomes excessive with respect to the amount required for maintaining a sufficient quality of the picture.
Accordingly, in general, the quality of the picture after the expansion and decoding becomes higher in the case where the variable rate compression and coding system is used in comparison with the case where the fixed rate compression and coding system is used.
When considering the amount of the data after compression, when using the fixed rate compression and coding system, since the source data is compressed and coded by a constant compression and coding rate, the amount of data after compression and coding can be correctly estimated from the amount of the source data before the compression and coding. Accordingly, the recording medium having the recording capacity necessary for recording the data after compression and coding can be easily selected.
On the other hand, as mentioned above, if the fixed rate compression and coding system is used, since the compression and coding are carried out with the same compression and coding rate both for a part where the pattern of the source data is complex and for a part where the pattern is simple, the quality of the picture at the part where the pattern of the source data is complex becomes poor.
Further, in the fixed rate compression and coding system, since the amount of data after the compression and coding changes in accordance with the value of the compression and coding rate, when the storage capacity of the recording medium for recording the compressed data is small, the compression and coding rate must be lowered and thus the quality of the overall picture after expansion and decoding becomes low. Accordingly, in order to maintain a high quality of the picture after the expansion and decoding, the recording capacity of the recording medium must be made large.
When using the variable rate compression and coding system, the compression and coding are carried out while adaptively changing the compression and coding rate in accordance with the complexity of the pattern. That is, in the variable rate compression and coding system, the part where the pattern of the source data is difficult is compressed and coded with a low compression and coding rate, while the video data of the part where the pattern is simple is compressed and coded with the high compression and coding rate.
Accordingly, if the variable rate compression and coding system is used, the quality of the picture after the expansion and decoding can be improved in comparison with the case where the fixed rate compression and coding system is used.
When the variable rate compression and coding system is used, however, the amount of data after the compression and coding cannot be estimated definitively from the amount of the source data before the compression. Accordingly, with just a single compression and coding processing, the source data cannot be reliably compressed and coded to an amount of data less than the recording capacity of a DVD (digital video disc device) or other recording medium and reliably recorded on the same.
The fixed rate compression and coding system and the variable rate compression and coding system have their advantages and disadvantages as mentioned above, but a recent trend has been for the greater use of the variable rate compression and coding system, which gives a higher quality of the picture as a whole after the expansion and decoding, in comparison with the fixed rate compression and coding system. As representative variable rate compression and coding systems, the MPEG system (system of compression and coding of moving pictures developed by the Moving Picture Coding Experts Group) as represented by MPEG1 and MPEG2 have been known.
In order to record compressed data on a DVD or other recording medium, it is necessary to properly set the compression and coding rate (bit rate) and to compress and code the data and record the compressed data so that the compressed data can be accommodated in the recording medium. For this reason, a two-path system mentioned below is applied.
First, compression and coding process is carried out for determining the compression and coding rate so that the amount of the data after the compression and coding becomes less than the recording capacity of the DVD or other recording medium is carried out(first compression and coding processing). That is, processing for allocating the amounts of data to the parts of the source data is carried out calculating back from the recording capacity of the recording medium so that all of the compressed data can be recorded on the recording medium.
Next, referring to the amounts of data allocated to the parts of the source data, precise compression and coding processing (second compression and coding processing) is carried out again so that the amounts of data after the compression and coding become the amounts of data allocated to these parts to thereby generate the compressed data which is then recorded on the DVD or other recording medium.
More concretely, for example, the source data is divided into scenes of every time tscene, an amount of data d(i) suited to a scene is allocated for every scene i, and, based on the ratio of that amount of data d(i) occupied in the overall video data, a bit rate that satisfies for example the following Equation 1 is found for each scene. Then, the compression and coding of that scene are carried out with that bit rate.
Rv(i)=tscenexe2x89xa6(Sxc3x97(d(i)/D)) xe2x80x83xe2x80x83(1) 
where,
Rv(i) is a compression and coding bit rate of the video data of the scene i,
tscene is the time of the scene i,
S is the capacity of the recording medium,
i is the number of the scene,
d(i) is the compressed amount of the video data of the scene i, and
D is the amount of the entire video data, where D=xcexa3d(i).
Since such a two-path system of a variable rate compression and coding system performs the compression and coding processing twice, it suffers from the following disadvantages.
Since it is necessary to perform the compression and coding processing twice, a long time is taken for the compression and coding processing and also much labor is involved on the part of the workers performing the compression and coding processing. As a result, the production price becomes high. For example, in order to compress and code the source data of a movie program of 135 minutes length recorded on a master video tape and record the same as the audio and/or video data on a DVD, at least double the processing time, i.e., 270 minutes (four hours and 30 minutes), is required. Further, working time such as the rewind time of the master video tape becomes necessary in addition to this.
Further, due to the variable rate compression and coding system, the compressing and coding apparatus has to have a compression and coding unit for performing the first compression and coding processing for finding the amounts of data generated at the different parts of the source data preceding the actual compression and coding processing (second compression and coding processing), thus the apparatus becomes complex and the size of the apparatus becomes large.
In the two-path system of the variable rate compression and coding system explained above, the information, which is required in the second time compression and coding processing, on the amounts of data allocated to the different parts of the source data based on the amounts of data of the compressed data obtained by the first compression and coding processing (allocation information) is stored for example in the personal computer (PC) controlling the compression and coding processing.
When the compression and coding of the source data is carried out only one time, it is sufficient to just store the allocation information in the personal computer for controlling the compression and coding processing. However, there is no guarantee that the allocation information will continue to be stored in the personal computer as it is even after the compression and coding, therefore when source data recorded on a master video tape or a work master video tape is repeatedly reproduced for compression and coding many times, there is a possibility that it would become necessary to perform the compression and coding processing by the two path system every time.
The present invention was made so as to overcome the disadvantages of the prior art and has as its object to provide an audio and/or video data recording apparatus, and a method for the same, which can compress and code source data (stock data) with a compression and coding rate in accordance with the recording capacity of the recording medium and thereby effectively utilize the recording capacity of the recording medium and in addition which can make the data after the expansion and decoding high in quality.
Further, still another object of the present invention is to provide an audio and/or video data recording apparatus, and a method of the same, which can estimate the amount of data after compression of the source data by the variable rate compression and coding system during the time when the source data is being copied from the master video tape to the work video tape.
Further, yet another object of the present invention is to provide an audio and/or video data recording apparatus, and a method of the same, which can record the allocation data indicating the amounts of data allocated to the parts of the source data together on the recording medium recording the source data.
Further, another object of the present invention is to provide an audio and/or video data recording apparatus, and a method of the same, which can reproduce the allocation data from the recording medium together with the source data and perform the variable rate compression and coding processing based on the reproduced allocation data.
Further, another object of the present invention is to provide an audio and/or video data recording apparatus, and a method of the same, which does not require the use of a two-path system of the variable rate compression and coding system each time the same data is compressed and coded and which can therefore quickly compress and code the source data.
Further, another object of the present invention is to provide a recording medium such as a video recording tape on which the allocation information is recorded in addition to the source data.
To achieve the above objects, a first audio and/or video data compressing apparatus according to the present invention has an audio and/or video data reproducing means for reproducing audio and/or video data from a first recording medium on which audio data and video data or either of the same (audio and/or video data) are recorded; a first audio and/or video data recording means for recording the audio and/or video data reproduced by the audio and/or video data reproducing means on a second recording medium; an audio and/or video data compressing means for quantizing the supplied audio and/or video data and compressing the same to generate compressed data; and a quantization value calculating means for calculating a quantization value for making an amount of the compressed data a desired amount of data based on an amount of compressed data generated by the quantization and compression of the audio and/or video data, reproduced from the first recording medium by the reproducing means, by the audio and/or video data compressing means by a predetermined quantization value.
Preferably, when compressing the video data, the quantization value calculating means calculates the quantization value for every group of a plurality of frames based on the amount of the compressed data generated by the audio and/or video data compressing means.
Preferably, the audio and/or video data compressing means quantizes the audio and/or video data recorded on the second recording medium based on the quantization value calculated by the quantization value calculating means.
Preferably, the first audio and/or video data recording means records the quantization value calculated by the quantization value calculating means on the second recording medium.
Preferably, there is further provided a second audio and/or video data recording means for recording the compressed data, which is generated by reproducing data from the second recording medium by the audio and/or video data reproducing means and quantizing and compressing the same by the audio and/or video data compressing means, on a third recording medium; and the quantization value calculating means calculates the quantization value so that the amount of the compressed data generated by the audio and/or video data compressing means does not exceed the recording capacity of the third recording medium.
Preferably, the first recording means records the quantization value calculated by the quantization value calculating means recorded in the second recording medium at a position before the position where the compressed data generated by the audio and/or video data compressing means.
The first audio and/or video data recording apparatus according to the present invention makes a copy of the uncompressed and uncoded source data (audio and/or video data) from the master use VTR tape (master video tape: first recording medium) etc. recording the audio and/or video data (source data) such as a program which becomes the material for editing etc. to a standby use VTR tape (work video tape: second recording medium) etc., compresses and codes the data by a variable rate compression and coding system such as the MPEG to generate compressed data of less than the recording capacity of a recording medium such as a magneto-optical disk (MO) or digital video disk (DVD) so that it can be recorded on these recording media, and records the same.
In the audio and/or video data recording apparatus according to the present invention, the audio and/or video data reproducing means reproduces the source data from the master video tape (first recording medium).
The first audio and/or video data recording means records the source data reproduced from the master video tape by the audio and/or video data reproducing means on the work video tape.
The audio and/or video data compressing means compresses and codes the source data reproduced by the audio and/or video data reproducing means by a compression and coding system such as the MPEG2 to generate the compressed data. That is, the audio and/or video data compressing means performs the compression processing of the reproduced source data by discrete cosine transformation (DCT) of the difference between frames in units of groups of pictures (GOPs) containing a plurality of frames, quantizes the same with a fixed quantization value which is set in advance, and codes this by run length limited (RLL) coding etc. to generate compressed data having a variable length during the time that the audio and/or video data reproducing means is reproducing the source data from the master video tape and copying the reproduced source data on the work video tape.
The quantization value calculating means calculates the amount of the compressed data generated by the audio and/or video data compressing means performing the compression processing and quantizing the result by the fixed quantization value in for example units of groups of pictures and calculates a new quantization value giving an amount of the compressed and coded data less than the recording capacity of the DVD etc. and giving the smallest remaining recording capacity based on the amount of this compressed data and the recording capacity of the DVD or the like (third recording medium) during the time when the source data is being copied from the master video tape to the work video tape.
By calculating the quantization value based on the amount of the compressed data obtained by the first compression and coding (first path) in this way and using the optimized quantization value in the second compression and coding (second path), compression and coding enabling recording on a DVD etc. and in addition giving the highest quality of the audio and/or video after the expansion and decoding can be carried out.
Further, since a new quantization value is calculated during the time when the source data is being copied to the work video tape, it is not necessary to reproduce the source data just to calculate the new quantization value and thus the time of the compression and coding processing and recording processing can be shortened by this amount.
The audio and/or video data recording means records the compressed and coded data, which the compressing and coding means generates by compressing and coding the source data reproduced by the recording and reproducing means, by using the new quantization value on a recording medium such as an MO.
Further, the audio and/or video data recording means records the quantization value calculated by the quantization value calculating means on the master video tape or the work video tape so that it can be used whenever compressing and coding the source data so as thereby to make the calculation of the quantization value at times other than the first time unnecessary and to shorten the time required for the compression and coding processing after the first time.
Further, a second audio and/or video data compressing apparatus according to the present invention has an audio and/or video data reproducing means for reproducing audio and/or video data from a first recording medium on which audio data and video data or either of the same (audio and/or video data) are recorded; an audio and/or video data recording means for recording the audio and/or video data reproduced by the audio and/or video data reproducing means on a second recording medium; and an audio and/or video data compressing means for quantizing the supplied audio and/or video data and compressing the same to generate compressed data, wherein the audio and/or video data recording means records data indicating the amount of the compressed data, generated by the audio and/or video data compressing means quantizing the audio and/or video data reproduced from the first recording medium by the reproducing means with a quantization value determined in advance and compressing the same, on the second recording medium.
Further, a third audio and/or video data compressing apparatus according to the present invention has an audio and/or video data reproducing means for reproducing audio and/or video data from a first recording medium on which the audio data and video data or either of them same (audio and/or video data) are recorded; an audio and/or video data recording means for recording the audio and/or video data reproduced by the audio and/or video data reproducing means on a second recording medium; and an audio and/or video data compressing means for quantizing the supplied audio and/or video data and compressing the same to generate compressed data, wherein the audio and/or video data recording means further records data indicating the amount of the compressed data, which the audio and/or video data compressing means generates by quantizing the audio and/or video data reproduced from the first recording medium by the reproducing means with a quantization value determined in advance and compressing the same, on a third recording medium.
Further, a fourth audio and/or video data compressing apparatus according to the present invention has a first audio and/or video data compressing means for reproducing audio and/or video data from a first recording medium on which the audio data and video data or either of the same (audio and/or video data) are recorded and quantizing and compressing the same to thereby generate compressed data; a compressed data amount calculating means for calculating an amount of compressed data indicating the data after the compression of the audio and/or video data based on the amount of the compressed data generated by the audio and/or video data compressing means; and a recording means for recording the amount of compressed data calculated by the compressed data amount calculating means on the first recording medium.
Preferably, the recording means records the amount of compressed data calculated by the compressed data amount calculating means in the first recording medium at a position before the position where the audio and/or video data is recorded.
Preferably, there is further provided a second audio and/or video data compressing means for reproducing the amount of the compressed data and the audio and/or video data recorded on the first recording medium by the recording means and quantizing and compressing the reproduced the audio and/or video data based on reproduced amount of compressed data.
Preferably, the recording means records a quantization value used for quantization in the second audio and/or video data compressing means on the first recording medium as the amount of compressed data.
Further, a fifth audio and/or video data compressing apparatus according to the present invention has an audio and/or video data compressing means for reproducing audio and/or video data from a first recording medium on which the audio data and video data or either of the same (audio and/or video data) are recorded and quantizing and compressing the same to thereby generate compressed data and a recording means for recording an amount of compressed data indicating the amount of the compressed data generated by the audio and/or video data compressing means on the first recording medium.
Preferably, the recording means records the amount of compressed data calculated by a compressed data amount calculating means in the first recording medium at a position before the position where the audio and/or video data is recorded.
Further, a first audio and/or video data compressing method according to the present invention comprises reproducing audio and/or video data from a first recording medium on which the audio data and video data or either of the same (audio and/or video data) are recorded; recording the reproduced audio and/or video data on a second recording medium; and calculating a quantization value for making the compressed data have a desired amount of data based on the amount of the compressed data generated by quantizing the audio and/or video data reproduced from the first recording medium with a quantization value determined in advance and compressing the same.
Further, a second audio and/or video data compressing method according to the present invention comprises reproducing audio and/or video data from a first recording medium on which the audio data and video data or either of the same (audio and/or video data) are recorded; recording the reproduced audio and/or video data on a second recording medium; and recording data indicating the amount of the compressed data generated by quantizing the audio and/or video data reproduced from the first recording medium with a quantization value determined in advance and compressing the same on the second recording medium.
Further, a third audio and/or video data compressing method according to the present invention comprises reproducing audio and/or video data from a first recording medium on which the audio data and video data or either of the same (audio and/or video data) are recorded; recording the reproduced audio and/or video data on a second recording medium; and further recording data indicating the amount of the compressed data generated by quantizing the audio and/or video data reproduced from the first recording medium with a quantization value determined in advance and compressing the same on a third recording medium.
Further, a fourth audio and/or video data compressing method according to the present invention comprises reproducing audio and/or video data from a first recording medium on which the audio data and video data or either of the same (audio and/or video data) are recorded; quantizing and compressing the same to generate compressed data; calculating an amount of compressed data indicating the data after the compression of the audio and/or video data based on the amount of the generated compressed data; and recording the calculated amount of compressed data on the first recording medium.
Further, a fifth audio and/or video data compressing method according to the present invention comprises reproducing audio and/or video data from a first recording medium on which the audio data and video data or either of the same (audio and/or video data) are recorded; quantizing and compressing the same to generate compressed data; and recording an amount of compressed data indicating the amount of the generated compressed data on the first recording medium.